load("@io_bazel_rules_go//go:def.bzl", "go_library", "go_test")

go_library(
    name = "ipaddr",
    srcs = [
        "ip.go",
        "ipaddr.go",
    ],
    importpath = "github.com/cockroachdb/cockroach/pkg/util/ipaddr",
    visibility = ["//visibility:public"],
    deps = [
        "//pkg/sql/pgwire/pgcode",
        "//pkg/sql/pgwire/pgerror",
        "//pkg/util/uint128",
        "@com_github_cockroachdb_errors//:errors",
    ],
)

go_test(
    name = "ipaddr_test",
    size = "small",
    srcs = ["ipaddr_test.go"],
    embed = [":ipaddr"],
    deps = ["//pkg/util/uint128"],
)
